<?php 
namespace Admin\Model;
use Think\Model;
Class AdminModel extends Model{     
       //验证登录信息
    public function checkName($name,$pwd,$table){
        $admin = M($table);
        $info = $admin->where("name='{$name}'")->find();  

        if(!empty($info)){
            //验证密码  
            if($info['password'] == $pwd){
                 return $info;
                return ture;
            }else{
                return false;
            }
        }else{
            return false;
        }
    }

  
}
?>

